#ifndef __LOOP_QUEUE_H
#define __LOOP_QUEUE_H

#include <stdlib.h>
#include <ctype.h>
#include "netfd_hashmap.h"

typedef struct loop_queue_s{
    int front;  //队头
    int rear;   //队尾
    int capacity; //队列容量上线
    int size;    //队列大小
    HashMap** array; //队列数组,存放可变大小的数组
}LoopQueue_t;

LoopQueue_t*createLoopQueue(int capacity);
void destroyLoopQueue(LoopQueue_t*loopqueue);
HashMap* enqueueLoop(LoopQueue_t*quene,HashMap* element);
HashMap* dequeueLoop(LoopQueue_t*quene);
HashMap* front(LoopQueue_t*quene);
HashMap* rear(LoopQueue_t*quene);
int isEmpty(LoopQueue_t*quene);
int isFull(LoopQueue_t*quene);
#endif
